<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateTypesTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        //
		Schema::create('types', function (Blueprint $table) {
            $table->increments('tid')->comment('类别ID');
            $table->string('tname')->comment('类别名称');
            $table->unsignedInteger('pid')->default(0)->comment('父类ID');
            $table->string('path')->default(0)->comment('路径');
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        //
		Schema::drop('types');
    }
}
